package cn.leon.controller;

import cn.leon.common.pojo.TaotaoResult;
import cn.leon.content.service.ContentService;
import cn.leon.pojo.Content;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class ContentController {

    @Autowired
    private ContentService contentService;

    @RequestMapping("/content/save")
    @ResponseBody
    public TaotaoResult addContent(Content content){
        contentService.addContent(content);
        return TaotaoResult.ok();
    }
}
